entry: Remove hacky code
authorMatthias Clasen <mclasen@redhat.com>
Fri, 14 Jun 2019 16:43:58 +0000 (16:43 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 16 Jun 2019 01:40:50 +0000 (21:40 -0400)
We can leave it up to apps to not set less-than-useful
combinations, such as show-emoji-icon, but a no-emoji
input hint.

gtk/gtkentry.c

index 878cfee2f3bef9e3db8a23368a9a269fc9d14384..b746537ba4d59719b7fc9820471609e6b9eb696d 100644 (file)
@@ -3477,8 +3477,6 @@ set_show_emoji_icon (GtkEntry *entry,
                      gboolean  value)
 {
   GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
-  GActionGroup *actions;
-  GAction *action;
 
   if (priv->show_emoji_icon == value)
     return;
@@ -3520,12 +3518,6 @@ set_show_emoji_icon (GtkEntry *entry,
 
   g_object_notify_by_pspec (G_OBJECT (entry), entry_props[PROP_SHOW_EMOJI_ICON]);
   gtk_widget_queue_resize (GTK_WIDGET (entry));
-
-  actions = gtk_widget_get_action_group (priv->text, "context");
-  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "insert-emoji");
-  g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
-                               priv->show_emoji_icon ||
-                               (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_NO_EMOJI) == 0);
 }
 
 GtkEventController *